<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Kubernetes 命名空间详情</title>
  <script src="https://cdn.tailwindcss.com"></script>
  <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
  <script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.8/dist/chart.umd.min.js"></script>
  
  <!-- Tailwind 配置 -->
  <script>
    tailwind.config = {
      theme: {
        extend: {
          colors: {
            primary: '#165DFF',
            secondary: '#36CFC9',
            success: '#52C41A',
            warning: '#FAAD14',
            danger: '#FF4D4F',
            dark: '#1F2937',
            'dark-light': '#374151',
            'gray-light': '#F3F4F6',
            'gray-medium': '#E5E7EB'
          },
          fontFamily: {
            inter: ['Inter', 'system-ui', 'sans-serif'],
          },
        },
      }
    }
  </script>
  
  <style type="text/tailwindcss">
    @layer utilities {
      .content-auto {
        content-visibility: auto;
      }
      .card-shadow {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
      }
      .hover-lift {
        transition: transform 0.2s, box-shadow 0.2s;
      }
      .hover-lift:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
      }
      .progress-bar {
        height: 8px;
        border-radius: 4px;
        overflow: hidden;
      }
      .progress-value {
        height: 100%;
        transition: width 0.6s ease;
      }
      .tag-container {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 0.5rem;
      }
    }
  </style>
</head>
<body class="bg-gray-50 font-inter text-dark antialiased">
  <!-- 顶部导航栏 -->
  <header class="bg-white shadow-sm fixed top-0 left-0 right-0 z-30">
    <div class="container mx-auto px-4">
      <div class="flex items-center justify-between h-16">
        <!-- 左侧Logo和标题 -->
        <div class="flex items-center space-x-4">
          <div class="flex items-center">
            <i class="fa fa-cubes text-primary text-2xl mr-2"></i>
            <span class="font-semibold text-lg text-dark">K8s 控制台</span>
          </div>
          <div class="hidden md:flex items-center text-sm text-gray-500">
            <span class="mx-2"><i class="fa fa-chevron-right text-xs"></i></span>
            <span>命名空间</span>
            <span class="mx-2"><i class="fa fa-chevron-right text-xs"></i></span>
            <span class="text-primary font-medium">生产环境</span>
          </div>
        </div>
        
        <!-- 右侧功能区 -->
        <div class="flex items-center space-x-6">
          <!-- 搜索框 -->
          <div class="hidden md:block relative">
            <input type="text" placeholder="搜索..." class="pl-9 pr-4 py-2 rounded-lg bg-gray-light text-sm focus:outline-none focus:ring-2 focus:ring-primary/30 w-64 transition-all">
            <i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
          </div>
          
          <!-- 通知图标 -->
          <div class="relative cursor-pointer hover:text-primary transition-colors">
            <i class="fa fa-bell-o text-lg"></i>
            <span class="absolute -top-1 -right-1 bg-danger text-white text-xs rounded-full w-4 h-4 flex items-center justify-center">3</span>
          </div>
          
          <!-- 用户信息 -->
          <div class="flex items-center space-x-2 cursor-pointer group">
            <div class="w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center text-primary font-medium">管</div>
            <span class="hidden md:inline text-sm font-medium">管理员@example.com</span>
            <i class="fa fa-chevron-down text-xs text-gray-500 group-hover:text-primary transition-colors"></i>
          </div>
        </div>
      </div>
    </div>
  </header>

  <!-- 主内容区 -->
  <div class="flex pt-16 min-h-screen">
    <!-- 侧边栏 -->
    <aside class="w-64 bg-white shadow-sm fixed h-full z-20 hidden md:block">
      <div class="p-4">
        <nav class="space-y-1">
          <a href="#" class="flex items-center px-4 py-3 text-sm text-gray-600 hover:bg-gray-light rounded-lg transition-colors">
            <i class="fa fa-tachometer w-5 text-center mr-3"></i>
            <span>仪表盘</span>
          </a>
          <a href="#" class="flex items-center px-4 py-3 text-sm bg-primary/10 text-primary rounded-lg font-medium">
            <i class="fa fa-folder-open w-5 text-center mr-3"></i>
            <span>命名空间</span>
          </a>
          <a href="#" class="flex items-center px-4 py-3 text-sm text-gray-600 hover:bg-gray-light rounded-lg transition-colors">
            <i class="fa fa-cubes w-5 text-center mr-3"></i>
            <span>容器组(Pods)</span>
          </a>
          <a href="#" class="flex items-center px-4 py-3 text-sm text-gray-600 hover:bg-gray-light rounded-lg transition-colors">
            <i class="fa fa-rocket w-5 text-center mr-3"></i>
            <span>部署(Deployments)</span>
          </a>
          <a href="#" class="flex items-center px-4 py-3 text-sm text-gray-600 hover:bg-gray-light rounded-lg transition-colors">
            <i class="fa fa-exchange w-5 text-center mr-3"></i>
            <span>服务(Services)</span>
          </a>
          <a href="#" class="flex items-center px-4 py-3 text-sm text-gray-600 hover:bg-gray-light rounded-lg transition-colors">
            <i class="fa fa-cog w-5 text-center mr-3"></i>
            <span>配置项(ConfigMaps)</span>
          </a>
          <a href="#" class="flex items-center px-4 py-3 text-sm text-gray-600 hover:bg-gray-light rounded-lg transition-colors">
            <i class="fa fa-key w-5 text-center mr-3"></i>
            <span>密钥(Secrets)</span>
          </a>
          <a href="#" class="flex items-center px-4 py-3 text-sm text-gray-600 hover:bg-gray-light rounded-lg transition-colors">
            <i class="fa fa-database w-5 text-center mr-3"></i>
            <span>持久卷(Persistent Volumes)</span>
          </a>
          <a href="#" class="flex items-center px-4 py-3 text-sm text-gray-600 hover:bg-gray-light rounded-lg transition-colors">
            <i class="fa fa-sitemap w-5 text-center mr-3"></i>
            <span>节点(Nodes)</span>
          </a>
        </nav>
        
        <div class="mt-8 pt-6 border-t border-gray-medium">
          <h4 class="px-4 text-xs font-semibold text-gray-500 uppercase tracking-wider mb-3">集群</h4>
          <a href="#" class="flex items-center px-4 py-3 text-sm text-gray-600 hover:bg-gray-light rounded-lg transition-colors">
            <i class="fa fa-cog w-5 text-center mr-3"></i>
            <span>设置</span>
          </a>
          <a href="#" class="flex items-center px-4 py-3 text-sm text-gray-600 hover:bg-gray-light rounded-lg transition-colors">
            <i class="fa fa-history w-5 text-center mr-3"></i>
            <span>审计日志</span>
          </a>
        </div>
      </div>
    </aside>

    <!-- 主内容 -->
    <main class="flex-1 md:ml-64 p-4 md:p-6 lg:p-8">
      <!-- 移动端标题 -->
      <div class="md:hidden mb-4">
        <h1 class="text-lg font-semibold">命名空间: production</h1>
        <p class="text-sm text-gray-500">创建于2个月前</p>
      </div>
      
      <!-- 操作栏 -->
      <div class="flex flex-col sm:flex-row justify-between items-start sm:items-center mb-6 gap-4">
        <div>
          <h1 class="text-[clamp(1.5rem,3vw,2rem)] font-bold text-dark">production</h1>
          <p class="text-gray-500 mt-1">命名空间详情与资源概览</p>
        </div>
        
        <div class="flex flex-wrap gap-2">
          <button class="inline-flex items-center px-4 py-2 bg-white border border-gray-medium rounded-lg text-sm font-medium text-gray-700 hover:bg-gray-light transition-colors">
            <i class="fa fa-download mr-2"></i> 导出
          </button>
          <button class="inline-flex items-center px-4 py-2 bg-white border border-gray-medium rounded-lg text-sm font-medium text-gray-700 hover:bg-gray-light transition-colors">
            <i class="fa fa-history mr-2"></i> 历史
          </button>
          <button class="inline-flex items-center px-4 py-2 bg-primary text-white rounded-lg text-sm font-medium hover:bg-primary/90 transition-colors">
            <i class="fa fa-plus mr-2"></i> 添加资源
          </button>
        </div>
      </div>
      
      <!-- 状态标签 -->
      <div class="mb-6 inline-flex items-center px-3 py-1 rounded-full bg-success/10 text-success text-sm font-medium">
        <span class="w-2 h-2 rounded-full bg-success mr-2"></span> 活跃
        <span class="text-gray-500 ml-2">创建时间: 2023年5月15日 09:42</span>
      </div>
      
      <!-- 基本信息卡片 -->
      <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8">
        <!-- 命名空间基本信息 -->
        <div class="bg-white rounded-xl p-6 card-shadow hover-lift">
          <h2 class="text-lg font-semibold mb-4 flex items-center">
            <i class="fa fa-info-circle text-primary mr-2"></i> 命名空间详情
          </h2>
          
          <div class="space-y-4">
            <div>
              <p class="text-sm text-gray-500 mb-1">名称</p>
              <p class="font-medium">production</p>
            </div>
            
            <div>
              <p class="text-sm text-gray-500 mb-1">唯一标识(UID)</p>
              <p class="text-sm font-mono bg-gray-light px-2 py-1 rounded overflow-x-auto">a1b2c3d4-5678-90ef-ghij-klmnopqrstuv</p>
            </div>
            
            <div>
              <p class="text-sm text-gray-500 mb-1">状态</p>
              <p class="text-sm"><span class="inline-flex items-center px-2 py-1 rounded-full bg-success/10 text-success text-xs">活跃</span></p>
            </div>
            
            <div>
              <p class="text-sm text-gray-500 mb-1">创建时间</p>
              <p class="text-sm">2023年5月15日 09:42:18</p>
            </div>
            
            <div>
              <p class="text-sm text-gray-500 mb-1">资源版本</p>
              <p class="text-sm font-mono">1234567</p>
            </div>
          </div>
        </div>
        
        <!-- 标签和注释 -->
        <div class="bg-white rounded-xl p-6 card-shadow hover-lift">
          <h2 class="text-lg font-semibold mb-4 flex items-center">
            <i class="fa fa-tags text-primary mr-2"></i> 标签
          </h2>
          
          <div class="tag-container mb-6">
            <div class="inline-flex items-center px-3 py-1.5 bg-gray-light rounded-lg text-sm">
              <span class="font-medium mr-2">环境:</span>
              <span>生产环境</span>
            </div>
            <div class="inline-flex items-center px-3 py-1.5 bg-gray-light rounded-lg text-sm">
              <span class="font-medium mr-2">团队:</span>
              <span>后端开发</span>
            </div>
            <div class="inline-flex items-center px-3 py-1.5 bg-gray-light rounded-lg text-sm">
              <span class="font-medium mr-2">项目:</span>
              <span>电子商务平台</span>
            </div>
            <div class="inline-flex items-center px-3 py-1.5 bg-gray-light rounded-lg text-sm">
              <span class="font-medium mr-2">版本:</span>
              <span>v2.3.0</span>
            </div>
            <div class="inline-flex items-center px-3 py-1.5 bg-gray-light rounded-lg text-sm">
              <span class="font-medium mr-2">区域:</span>
              <span>华东</span>
            </div>
          </div>
          
          <button class="text-primary text-sm font-medium flex items-center hover:underline">
            <i class="fa fa-plus-circle mr-1"></i> 添加标签
          </button>
          
          <h2 class="text-lg font-semibold mt-6 mb-4 flex items-center">
            <i class="fa fa-sticky-note text-primary mr-2"></i> 注释
          </h2>
          
          <div class="space-y-3 mb-4">
            <div class="bg-gray-light rounded-lg p-3">
              <div class="font-medium text-sm mb-1">描述</div>
              <div class="text-sm text-gray-600">电子商务平台生产环境，包含前端、后端API、数据库和缓存服务</div>
            </div>
            <div class="bg-gray-light rounded-lg p-3">
              <div class="font-medium text-sm mb-1">联系人</div>
              <div class="text-sm text-gray-600">devops@example.com</div>
            </div>
            <div class="bg-gray-light rounded-lg p-3">
              <div class="font-medium text-sm mb-1">维护时间</div>
              <div class="text-sm text-gray-600">每周日凌晨2:00-4:00</div>
            </div>
            <div class="bg-gray-light rounded-lg p-3">
              <div class="font-medium text-sm mb-1">最后更新</div>
              <div class="text-sm text-gray-600">2023-07-02</div>
            </div>
          </div>
          
          <button class="text-primary text-sm font-medium flex items-center hover:underline">
            <i class="fa fa-plus-circle mr-1"></i> 添加注释
          </button>
        </div>
        
        <!-- 资源配额摘要 -->
        <div class="bg-white rounded-xl p-6 card-shadow hover-lift">
          <h2 class="text-lg font-semibold mb-4 flex items-center">
            <i class="fa fa-sliders text-primary mr-2"></i> 资源配额
          </h2>
          
          <div class="space-y-5">
            <div>
              <div class="flex justify-between mb-1">
                <span class="text-sm font-medium">CPU 请求</span>
                <span class="text-sm text-gray-500">4.5 / 10 核 (45%)</span>
              </div>
              <div class="progress-bar bg-gray-medium">
                <div class="progress-value bg-primary" style="width: 45%"></div>
              </div>
            </div>
            
            <div>
              <div class="flex justify-between mb-1">
                <span class="text-sm font-medium">CPU 限制</span>
                <span class="text-sm text-gray-500">8 / 20 核 (40%)</span>
              </div>
              <div class="progress-bar bg-gray-medium">
                <div class="progress-value bg-primary" style="width: 40%"></div>
              </div>
            </div>
            
            <div>
              <div class="flex justify-between mb-1">
                <span class="text-sm font-medium">内存请求</span>
                <span class="text-sm text-gray-500">12Gi / 32Gi (37.5%)</span>
              </div>
              <div class="progress-bar bg-gray-medium">
                <div class="progress-value bg-primary" style="width: 37.5%"></div>
              </div>
            </div>
            
            <div>
              <div class="flex justify-between mb-1">
                <span class="text-sm font-medium">内存限制</span>
                <span class="text-sm text-gray-500">20Gi / 64Gi (31.25%)</span>
              </div>
              <div class="progress-bar bg-gray-medium">
                <div class="progress-value bg-primary" style="width: 31.25%"></div>
              </div>
            </div>
            
            <div>
              <div class="flex justify-between mb-1">
                <span class="text-sm font-medium">容器组数量</span>
                <span class="text-sm text-gray-500">28 / 50 (56%)</span>
              </div>
              <div class="progress-bar bg-gray-medium">
                <div class="progress-value bg-warning" style="width: 56%"></div>
              </div>
            </div>
            
            <button class="mt-2 text-primary text-sm font-medium flex items-center hover:underline">
              <i class="fa fa-edit mr-1"></i> 编辑配额
            </button>
          </div>
        </div>
      </div>
      
      <!-- 资源使用图表 -->
      <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
        <!-- CPU使用趋势 -->
        <div class="bg-white rounded-xl p-6 card-shadow hover-lift">
          <div class="flex justify-between items-center mb-6">
            <h2 class="text-lg font-semibold flex items-center">
              <i class="fa fa-microchip text-primary mr-2"></i> CPU 使用情况
            </h2>
            <div class="flex items-center space-x-2 text-sm">
              <button class="px-3 py-1 rounded bg-primary/10 text-primary">1小时</button>
              <button class="px-3 py-1 rounded text-gray-500 hover:bg-gray-light">24小时</button>
              <button class="px-3 py-1 rounded text-gray-500 hover:bg-gray-light">7天</button>
              <button class="px-3 py-1 rounded text-gray-500 hover:bg-gray-light">30天</button>
            </div>
          </div>
          
          <div class="h-64">
            <canvas id="cpuChart"></canvas>
          </div>
        </div>
        
        <!-- 内存使用趋势 -->
        <div class="bg-white rounded-xl p-6 card-shadow hover-lift">
          <div class="flex justify-between items-center mb-6">
            <h2 class="text-lg font-semibold flex items-center">
              <i class="fa fa-memory text-primary mr-2"></i> 内存使用情况
            </h2>
            <div class="flex items-center space-x-2 text-sm">
              <button class="px-3 py-1 rounded bg-primary/10 text-primary">1小时</button>
              <button class="px-3 py-1 rounded text-gray-500 hover:bg-gray-light">24小时</button>
              <button class="px-3 py-1 rounded text-gray-500 hover:bg-gray-light">7天</button>
              <button class="px-3 py-1 rounded text-gray-500 hover:bg-gray-light">30天</button>
            </div>
          </div>
          
          <div class="h-64">
            <canvas id="memoryChart"></canvas>
          </div>
        </div>
      </div>
      
      <!-- 资源统计卡片 -->
      <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-8">
        <!-- 容器组 -->
        <div class="bg-white rounded-xl p-5 card-shadow hover-lift border-l-4 border-primary">
          <div class="flex justify-between items-start">
            <div>
              <p class="text-sm text-gray-500">容器组(Pods)</p>
              <h3 class="text-2xl font-bold mt-1">28</h3>
              <div class="flex items-center mt-2 text-sm">
                <span class="text-success flex items-center"><i class="fa fa-arrow-up mr-1"></i> 2</span>
                <span class="text-gray-500 ml-2">较上周</span>
              </div>
            </div>
            <div class="w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center text-primary">
              <i class="fa fa-cubes"></i>
            </div>
          </div>
          
          <div class="mt-4 flex items-center text-sm flex-wrap gap-2">
            <div class="flex items-center">
              <span class="w-2 h-2 rounded-full bg-success mr-1"></span>
              <span>24 运行中</span>
            </div>
            <div class="flex items-center">
              <span class="w-2 h-2 rounded-full bg-warning mr-1"></span>
              <span>2 等待中</span>
            </div>
            <div class="flex items-center">
              <span class="w-2 h-2 rounded-full bg-danger mr-1"></span>
              <span>2 错误</span>
            </div>
          </div>
        </div>
        
        <!-- 部署 -->
        <div class="bg-white rounded-xl p-5 card-shadow hover-lift border-l-4 border-secondary">
          <div class="flex justify-between items-start">
            <div>
              <p class="text-sm text-gray-500">部署(Deployments)</p>
              <h3 class="text-2xl font-bold mt-1">8</h3>
              <div class="flex items-center mt-2 text-sm">
                <span class="text-success flex items-center"><i class="fa fa-arrow-up mr-1"></i> 1</span>
                <span class="text-gray-500 ml-2">较上周</span>
              </div>
            </div>
            <div class="w-10 h-10 rounded-full bg-secondary/10 flex items-center justify-center text-secondary">
              <i class="fa fa-rocket"></i>
            </div>
          </div>
          
          <div class="mt-4 flex items-center text-sm">
            <div class="flex items-center mr-4">
              <span class="w-2 h-2 rounded-full bg-success mr-1"></span>
              <span>7 可用</span>
            </div>
            <div class="flex items-center">
              <span class="w-2 h-2 rounded-full bg-warning mr-1"></span>
              <span>1 更新中</span>
            </div>
          </div>
        </div>
        
        <!-- 服务 -->
        <div class="bg-white rounded-xl p-5 card-shadow hover-lift border-l-4 border-success">
          <div class="flex justify-between items-start">
            <div>
              <p class="text-sm text-gray-500">服务(Services)</p>
              <h3 class="text-2xl font-bold mt-1">12</h3>
              <div class="flex items-center mt-2 text-sm">
                <span class="text-gray-500">无变化</span>
              </div>
            </div>
            <div class="w-10 h-10 rounded-full bg-success/10 flex items-center justify-center text-success">
              <i class="fa fa-exchange"></i>
            </div>
          </div>
          
          <div class="mt-4 flex items-center text-sm flex-wrap gap-2">
            <div class="flex items-center">
              <span class="w-2 h-2 rounded-full bg-primary mr-1"></span>
              <span>5 集群IP</span>
            </div>
            <div class="flex items-center">
              <span class="w-2 h-2 rounded-full bg-secondary mr-1"></span>
              <span>4 节点端口</span>
            </div>
            <div class="flex items-center">
              <span class="w-2 h-2 rounded-full bg-warning mr-1"></span>
              <span>3 负载均衡</span>
            </div>
          </div>
        </div>
        
        <!-- 配置项与密钥 -->
        <div class="bg-white rounded-xl p-5 card-shadow hover-lift border-l-4 border-warning">
          <div class="flex justify-between items-start">
            <div>
              <p class="text-sm text-gray-500">配置项与密钥</p>
              <h3 class="text-2xl font-bold mt-1">23</h3>
              <div class="flex items-center mt-2 text-sm">
                <span class="text-danger flex items-center"><i class="fa fa-arrow-down mr-1"></i> 2</span>
                <span class="text-gray-500 ml-2">较上周</span>
              </div>
            </div>
            <div class="w-10 h-10 rounded-full bg-warning/10 flex items-center justify-center text-warning">
              <i class="fa fa-key"></i>
            </div>
          </div>
          
          <div class="mt-4 flex items-center text-sm">
            <div class="flex items-center mr-4">
              <span class="w-2 h-2 rounded-full bg-primary mr-1"></span>
              <span>15 配置项</span>
            </div>
            <div class="flex items-center">
              <span class="w-2 h-2 rounded-full bg-danger mr-1"></span>
              <span>8 密钥</span>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 资源列表 -->
      <div class="grid grid-cols-1 gap-6 mb-8">
        <!-- 最近事件 -->
        <div class="bg-white rounded-xl overflow-hidden card-shadow hover-lift">
          <div class="p-6 border-b border-gray-medium">
            <h2 class="text-lg font-semibold flex items-center">
              <i class="fa fa-bell text-primary mr-2"></i> 最近事件
            </h2>
          </div>
          
          <div class="divide-y divide-gray-medium">
            <div class="p-4 hover:bg-gray-50 transition-colors">
              <div class="flex justify-between">
                <div class="flex items-start">
                  <div class="w-8 h-8 rounded-full bg-success/10 flex items-center justify-center text-success mr-3 mt-0.5">
                    <i class="fa fa-check"></i>
                  </div>
                  <div>
                    <p class="font-medium">部署已更新</p>
                    <p class="text-sm text-gray-500 mt-1">frontend-v2 部署已成功更新</p>
                  </div>
                </div>
                <span class="text-xs text-gray-500 whitespace-nowrap">10分钟前</span>
              </div>
            </div>
            
            <div class="p-4 hover:bg-gray-50 transition-colors">
              <div class="flex justify-between">
                <div class="flex items-start">
                  <div class="w-8 h-8 rounded-full bg-warning/10 flex items-center justify-center text-warning mr-3 mt-0.5">
                    <i class="fa fa-exclamation-triangle"></i>
                  </div>
                  <div>
                    <p class="font-medium">容器组警告</p>
                    <p class="text-sm text-gray-500 mt-1">backend-pod-7f92d: 内存使用率过高（达到限制的85%）</p>
                  </div>
                </div>
                <span class="text-xs text-gray-500 whitespace-nowrap">35分钟前</span>
              </div>
            </div>
            
            <div class="p-4 hover:bg-gray-50 transition-colors">
              <div class="flex justify-between">
                <div class="flex items-start">
                  <div class="w-8 h-8 rounded-full bg-danger/10 flex items-center justify-center text-danger mr-3 mt-0.5">
                    <i class="fa fa-times"></i>
                  </div>
                  <div>
                    <p class="font-medium">容器组失败</p>
                    <p class="text-sm text-gray-500 mt-1">worker-pod-34bc7: 内存溢出被终止(OOMKilled)</p>
                  </div>
                </div>
                <span class="text-xs text-gray-500 whitespace-nowrap">1小时前</span>
              </div>
            </div>
            
            <div class="p-4 hover:bg-gray-50 transition-colors">
              <div class="flex justify-between">
                <div class="flex items-start">
                  <div class="w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center text-primary mr-3 mt-0.5">
                    <i class="fa fa-info-circle"></i>
                  </div>
                  <div>
                    <p class="font-medium">配置项已更新</p>
                    <p class="text-sm text-gray-500 mt-1">app-config 配置项已更新</p>
                  </div>
                </div>
                <span class="text-xs text-gray-500 whitespace-nowrap">2小时前</span>
              </div>
            </div>
            
            <div class="p-4 hover:bg-gray-50 transition-colors">
              <div class="flex justify-between">
                <div class="flex items-start">
                  <div class="w-8 h-8 rounded-full bg-success/10 flex items-center justify-center text-success mr-3 mt-0.5">
                    <i class="fa fa-check"></i>
                  </div>
                  <div>
                    <p class="font-medium">服务已创建</p>
                    <p class="text-sm text-gray-500 mt-1">payment-service 服务已创建</p>
                  </div>
                </div>
                <span class="text-xs text-gray-500 whitespace-nowrap">4小时前</span>
              </div>
            </div>
          </div>
          
          <div class="p-4 border-t border-gray-medium text-center">
            <button class="text-primary text-sm font-medium hover:underline">查看所有事件</button>
          </div>
        </div>
        
        <!-- 运行中的容器组 -->
        <div class="bg-white rounded-xl overflow-hidden card-shadow hover-lift">
          <div class="p-6 border-b border-gray-medium flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4">
            <h2 class="text-lg font-semibold flex items-center">
              <i class="fa fa-cubes text-primary mr-2"></i> 运行中的容器组
            </h2>
            <div class="relative w-full sm:w-auto">
              <input type="text" placeholder="搜索容器组..." class="pl-8 pr-4 py-2 rounded-lg bg-gray-light text-sm focus:outline-none focus:ring-2 focus:ring-primary/30 w-full sm:w-64 transition-all">
              <i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
            </div>
          </div>
          
          <div class="overflow-x-auto">
            <table class="min-w-full divide-y divide-gray-medium">
              <thead>
                <tr class="bg-gray-50">
                  <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">名称</th>
                  <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">状态</th>
                  <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">重启次数</th>
                  <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">运行时间</th>
                  <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">CPU / 内存</th>
                </tr>
              </thead>
              <tbody class="divide-y divide-gray-medium">
                <tr class="hover:bg-gray-50 transition-colors">
                  <td class="px-6 py-4 whitespace-nowrap text-sm font-medium">frontend-v2-7f98d7654-2x9k7</td>
                  <td class="px-6 py-4 whitespace-nowrap">
                    <span class="inline-flex items-center px-2 py-1 rounded-full bg-success/10 text-success text-xs">运行中</span>
                  </td>
                  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">0</td>
                  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">10天</td>
                  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">120m / 256Mi</td>
                </tr>
                <tr class="hover:bg-gray-50 transition-colors">
                  <td class="px-6 py-4 whitespace-nowrap text-sm font-medium">backend-api-6b8f7d6c5-9k3m7</td>
                  <td class="px-6 py-4 whitespace-nowrap">
                    <span class="inline-flex items-center px-2 py-1 rounded-full bg-success/10 text-success text-xs">运行中</span>
                  </td>
                  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1</td>
                  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">5天</td>
                  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">500m / 1Gi</td>
                </tr>
                <tr class="hover:bg-gray-50 transition-colors">
                  <td class="px-6 py-4 whitespace-nowrap text-sm font-medium">database-0</td>
                  <td class="px-6 py-4 whitespace-nowrap">
                    <span class="inline-flex items-center px-2 py-1 rounded-full bg-success/10 text-success text-xs">运行中</span>
                  </td>
                  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">0</td>
                  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">14天</td>
                  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1000m / 4Gi</td>
                </tr>
                <tr class="hover:bg-gray-50 transition-colors">
                  <td class="px-6 py-4 whitespace-nowrap text-sm font-medium">worker-pod-34bc7</td>
                  <td class="px-6 py-4 whitespace-nowrap">
                    <span class="inline-flex items-center px-2 py-1 rounded-full bg-danger/10 text-danger text-xs">失败</span>
                  </td>
                  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">5</td>
                  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1小时</td>
                  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">- / -</td>
                </tr>
                <tr class="hover:bg-gray-50 transition-colors">
                  <td class="px-6 py-4 whitespace-nowrap text-sm font-medium">cache-service-8d7f6-5t2w3</td>
                  <td class="px-6 py-4 whitespace-nowrap">
                    <span class="inline-flex items-center px-2 py-1 rounded-full bg-success/10 text-success text-xs">运行中</span>
                  </td>
                  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">0</td>
                  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">7天</td>
                  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">250m / 512Mi</td>
                </tr>
              </tbody>
            </table>
          </div>
          
          <div class="p-4 border-t border-gray-medium flex justify-between items-center">
            <p class="text-sm text-gray-500">显示 28 个容器组中的 5 个</p>
            <button class="text-primary text-sm font-medium hover:underline">查看所有容器组</button>
          </div>
        </div>
      </div>
      
      <!-- 底部信息 -->
      <div class="bg-white rounded-xl p-6 card-shadow text-center text-sm text-gray-500">
        <p>命名空间 'production' 属于集群 'main-cluster' (v1.26.3)</p>
        <p class="mt-1">最后检查时间: 今天 14:32</p>
      </div>
    </main>
  </div>

  <!-- JavaScript -->
  <script>
    // 初始化CPU使用图表
    const cpuCtx = document.getElementById('cpuChart').getContext('2d');
    const cpuChart = new Chart(cpuCtx, {
      type: 'line',
      data: {
        labels: ['0', '10', '20', '30', '40', '50', '60'],
        datasets: [
          {
            label: 'CPU 使用 (核)',
            data: [3.2, 3.5, 4.1, 3.8, 4.5, 4.2, 4.5],
            borderColor: '#165DFF',
            backgroundColor: 'rgba(22, 93, 255, 0.1)',
            tension: 0.4,
            fill: true
          },
          {
            label: 'CPU 限制 (核)',
            data: [10, 10, 10, 10, 10, 10, 10],
            borderColor: '#E5E7EB',
            borderDash: [5, 5],
            backgroundColor: 'transparent',
            tension: 0,
            fill: false
          }
        ]
      },
      options: {
        responsive: true,
        maintainAspectRatio: false,
        plugins: {
          legend: {
            position: 'top',
          },
          tooltip: {
            mode: 'index',
            intersect: false
          }
        },
        scales: {
          y: {
            beginAtZero: true,
            grid: {
              color: 'rgba(0, 0, 0, 0.05)'
            }
          },
          x: {
            title: {
              display: true,
              text: '分钟'
            },
            grid: {
              display: false
            }
          }
        }
      }
    });
    
    // 初始化内存使用图表
    const memoryCtx = document.getElementById('memoryChart').getContext('2d');
    const memoryChart = new Chart(memoryCtx, {
      type: 'line',
      data: {
        labels: ['0', '10', '20', '30', '40', '50', '60'],
        datasets: [
          {
            label: '内存使用 (Gi)',
            data: [10, 11.5, 12, 11, 12, 11.8, 12],
            borderColor: '#36CFC9',
            backgroundColor: 'rgba(54, 207, 201, 0.1)',
            tension: 0.4,
            fill: true
          },
          {
            label: '内存限制 (Gi)',
            data: [32, 32, 32, 32, 32, 32, 32],
            borderColor: '#E5E7EB',
            borderDash: [5, 5],
            backgroundColor: 'transparent',
            tension: 0,
            fill: false
          }
        ]
      },
      options: {
        responsive: true,
        maintainAspectRatio: false,
        plugins: {
          legend: {
            position: 'top',
          },
          tooltip: {
            mode: 'index',
            intersect: false
          }
        },
        scales: {
          y: {
            beginAtZero: true,
            grid: {
              color: 'rgba(0, 0, 0, 0.05)'
            }
          },
          x: {
            title: {
              display: true,
              text: '分钟'
            },
            grid: {
              display: false
            }
          }
        }
      }
    });
    
    // 添加滚动时导航栏样式变化
    window.addEventListener('scroll', function() {
      const header = document.querySelector('header');
      if (window.scrollY > 10) {
        header.classList.add('shadow');
      } else {
        header.classList.remove('shadow');
      }
    });
  </script>
</body>
</html>
